import request from '@/utils/request'
/**
 *获取园区管理列表
 * @param {*} params
 * @returns
 */
export function getEnterPriseList(params) {
  return request({
    url: '/park/enterprise',
    params
  })
}
/**
 *获取查看企业列表
 * @returns
 */
export function getAddMient() {
  return request({
    url: '/park/industry'
  })
}
/**
 *添加企业
 * @param {*} data
 * @returns
 */
export function getAddTianJia(data) {
  return request({
    url: '/park/enterprise',
    method: 'POST',
    data
  })
}
/**
 *编辑回显企业
 * @param {*} id
 * @returns
 */
export function getBianJiApi(id) {
  return request({
    url: `/park/enterprise/${id}`
  })
}

/**
 * 更新企业
 * @param {*} data
 * @returns
 */
export function updateExterpriseAPI(data) {
  return request({
    url: '/park/enterprise',
    method: 'PUT',
    data
  })
}
/**
 *删除企业
 * @param {*} id
 * @returns
 */
export function getDelete(id) {
  return request({
    url: `/park/enterprise/${id}`,
    method: 'DELETE'
  })
}
/**
 *查看租赁下拉框数据
 * @returns
 */
export function getBiuDing() {
  return request({
    url: '/park/rent/building'
  })
}
/**
 *添加合同
 * @param {*} data
 * @returns
 */
export function addBiuDing(data) {
  return request({
    url: '/park/enterprise/rent',
    method: 'post',
    data
  })
}
/**
 *展开租赁信息列表
 * @param {*} id 租赁id
 * @returns
 */
export function getEnters(id) {
  return request({
    url: `/park/enterprise/rent/${id}`
  })
}/**
 *退租
 * @param {*} id 租赁合同id
 * @returns
 */
export function getOut(id) {
  return request({
    url: `/park/enterprise/rent/${id}`,
    method: 'put'
  })
}
/**
 *删除合同
 * @param {*} id 租赁合同id
 * @returns
 */
export function deleteApi(id) {
  return request({
    url: `/park/enterprise/rent/${id}`,
    method: 'delete'
  })
}
